#pragma once
#include "McDropTarget.h"

struct TVWALL_PLAYER
{
	int nWndIndex;
	CRect rctPlayer;
	NvdInfo nvdInfo;
	BOOL bShow;
	BOOL bSelect;
	BOOL bUnite;
	BOOL bNvd;
	TVWALL_PLAYER()
	{
		bShow = FALSE;
		bSelect = FALSE;
		bUnite = FALSE;
		bNvd = FALSE;
	}
};

// CTvWallEditCtrl

class CTvWallEditCtrl : public CStatic, public CMcDropTarget
{
	DECLARE_DYNAMIC(CTvWallEditCtrl)

public:
	CTvWallEditCtrl();
	virtual ~CTvWallEditCtrl();

protected:
	DECLARE_MESSAGE_MAP()

public:
	afx_msg void OnPaint();
	void InitDrawPlayer(int nX, int nY);
	TVWALL_PLAYER m_TvPlayer[36];

	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	virtual BOOL OnDrop(const MC_DROP_DATA* pData, DROPEFFECT dropEffect, const CPoint& point);
	BOOL IsPlayerInRect(CRect player, CRect rect);
	void CombinePlayer();
	void SavePlayer();
	int FindRectIndex(CRect rctPlayer);

	BOOL m_bDrag;
	CPoint m_ptStart;
	CPoint m_ptLast;
	int m_nPlayerNum;
	int m_nX;
	int m_nY;

protected:
	virtual void PreSubclassWindow();
};


